package com.kate.mall.order.state;

import com.kate.mall.common.constants.OrderStatus;
import com.kate.mall.common.utils.DateProvider;
import com.kate.mall.order.dao.OrderDao;
import com.kate.mall.order.dto.OrderDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Description: 等待收获
 * @Auther: 新梦想*陈超
 * @Date: 2021/10/30 11:04
 */
@Component
public class WaitForReceveiptOrderState extends AbstractOrderState{
    @Autowired
    public WaitForReceveiptOrderState(OrderDao orderDao, DateProvider dateProvider) {
        super(orderDao, dateProvider);
    }

    @Override
    public Integer getOrderStatus(OrderDTO order) {
        return OrderStatus.WAIT_FOR_RECEVEIPT;
    }
    @Override
    public Boolean canConfirmReceipt(OrderDTO order) throws Exception {
        return true;
    }
}
